/**
 * Created by Baggio on 2019-1-8.
 */
$(function () {
    var postData = {};
    $.ajax({
        type: "get",
        url: "/productEntity/list",
        dataType: "json",
        async: false,
        data: postData,
        success: function (res) {
            console.log("=================>>>>>");
            console.log(res);
            if (res.code != 1) {
                alert(res.msg);
                return;
            }
            showData(res.data.list);
        }

    });
});
function showData(data) {
    html = ""

    for (var i = 0; i < data.length; i++) {
        html += "	<li data=\"" + data[i].productEntityId + "\">";
        html += "    <a href=\"/productEntity/" + data[i].productEntityId + "\">";
        html += "   <div class=\"imgbox\">";
        html += "   <img src=\"img/t009.png \" alt=\"\">";
        html += "   </div>";
        html += "  <h5>" + data[i].name + "</h5>";
        html += "   <h6>" + data[i].introduction + "</h6>";
        html += "  <span>￥" + data[i].price/100.00 + "</span>";
        html += "</a></li>";

    }

    $(".list_box ul").html(html);


}